clear all;
close all;
clc;

n = -3:8;
step1 = (n>=0);
step2 = ((n-6)>=0);
Rx = step1 - step2;
x = 0.5 * n .* Rx;
% splot
subplot(3,1,1);stem(n, x, 'fill');

step3 = (n+3)>=0;
step4 = (n-4)>=0;
Rh = step3 - step4;
h = 2*sin(pi/2.*n).*Rh;
subplot(3,1,2);stem(n, h, 'fill');

n1 = 0:5;
x1 = 0.5*n1;
n2 = -3:3;
h1 = 2*sin(pi*n2/2);
y = conv(x1, h1);
subplot(3,1,3);stem(n, y, 'fill');


